package com.have.blog.base.validator.constraint;

import com.have.blog.base.validator.annotation.IdValid;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

public class IdValidator implements ConstraintValidator<IdValid, Integer> {
    @Override
    public void initialize(IdValid constraintAnnotation) {

    }

    @Override
    public boolean isValid(Integer value, ConstraintValidatorContext constraintValidatorContext) {
        if (value == null) {
            return false;
        }
        return true;
    }
}
